home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / asm_subr.arc / CLS < prev    next >
Encoding:
Text File  |  1985-10-01  |  896 b   |  31 lines

  1. ;-------------------------routine begins--------------------------+
  2. ; ROUTINE FOR CLEAR GRAPHICS SCREEN
  3. ;
  4. ; FUNCTION: This routine clears the color graphics screen.
  5. ; INPUT: None
  6. ; OUTPUT: Just to the screen.
  7. ; REGISTERS USED:  No registers are modified.
  8. ; SEGMENTS REFERENCED:  Upom entry ES: must point to the screen RAM
  9. ; at B8000h.
  10. ; ROUTINES CALLED:  None
  11. ; SPECIAL NOTES: None
  12. ;
  13. cls    proc    far
  14.     push    cx        ; save registers
  15.     push    ax
  16. ;
  17. ; set up the registers
  18.     mov    cx,2000h    ; word count of whole screen
  19.     mov    ax,0        ; zero pattern for screen
  20.     mov    di,ax        ; get starting address
  21.      cld            ; go in forward direction
  22. ;
  23. ; clear screen with a single string operation
  24.     rep    stosw        ; this clears screen
  25. ;
  26.     pop    ax        ; restore registers
  27.     pop    cx
  28.     ret            ; return
  29. cls    endp
  30. ;-------------------------routine ends---------------------------+
  31.